#ifndef SEQUENCE_H
#define SEQUENCE_H

// Provides a partition function that re-arranges either
// a vector or a list "in situ".  This function is almost
// identical for both kinds of containers, so it is here
// to avoid duplicating code.
//
// Both Pile_List::partition and Pile_Vector::partition
// will call it.

#include <vector>
#include "Categorizer.h"

template<class Container>
void partition_sequentially(Categorizer& cat,
                            typename Container::iterator begin,
                            int n,
                            std::vector<typename Container::iterator>& firsts,
                            std::vector<typename Container::iterator>& lasts,
                            std::vector<int>& ns);
#endif
